this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.Ui=this.BX.Landing.Ui||{};this.BX.Landing.Ui.Panel=this.BX.Landing.Ui.Panel||{};this.BX.Landing.Ui.Panel.Formsettingspanel=this.BX.Landing.Ui.Panel.Formsettingspanel||{};(function(e,n,t,a,i,s,r,o,l){"use strict";var d=function(e){babelHelpers.inherits(n,e);function n(e){var r;babelHelpers.classCallCheck(this,n);r=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this,e));r.setEventNamespace("BX.Landing.UI.Panel.FormSettingsPanel.VkContent");r.addItem(new t.HeaderCard({title:a.Loc.getMessage("LANDING_SIDEBAR_BUTTON_VK")}));if(!r.options.dictionary.integration.canUse){r.addItem(new o.MessageCard({header:a.Loc.getMessage("LANDING_CRM_FORM_INTEGRATION_SEO_NOT_INSTALLED_HEADER"),description:a.Loc.getMessage("LANDING_CRM_FORM_INTEGRATION_SEO_NOT_INSTALLED_VK_TEXT"),angle:false,closeable:false}));return babelHelpers.possibleConstructorReturn(r)}var d=new i.BaseCard;s.Dom.style(d.getLayout(),{padding:0,margin:0});var g=new l.Integration({type:"vkontakte",form:r.options.formOptions,fields:r.options.crmFields,dictionary:r.options.dictionary});g.subscribe("change",r.onChange.bind(babelHelpers.assertThisInitialized(r)));s.Dom.append(g.render(),d.getBody());r.addItem(d);return r}babelHelpers.createClass(n,[{key:"prepareButtonText",value:function e(n){var t=n.integration.cases.some((function(e){return e.providerCode==="vkontakte"}));if(t){return a.Loc.getMessage("LANDING_FORM_SETTINGS_VK_BUTTON_ENABLED")}return a.Loc.getMessage("LANDING_FORM_SETTINGS_VK_BUTTON")}},{key:"valueReducer",value:function e(n){return{integration:this.options.formOptions.integration}}},{key:"onChange",value:function e(n){this.emit("onChange",{skipPrepare:false})}},{key:"getData",value:function e(){return this.options.formOptions.integration.cases.filter((function(e){return e.providerCode==="vkontakte"}))[0]||null}}]);return n}(n.ContentWrapper);e.default=d})(this.BX.Landing.Ui.Panel.Formsettingspanel.Content=this.BX.Landing.Ui.Panel.Formsettingspanel.Content||{},BX.Landing.UI.Panel,BX.Landing.UI.Card,BX.Landing,BX.Landing.UI.Card,BX,BX.Event,BX.Landing.UI.Card,BX.Crm.Form);
//# sourceMappingURL=vk.bundle.map.js